// Win32ECGFDAXMLConv.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <memory.h>
#include <string.h>
#include "..\ECGFDAXMLConv\ECGFDAXMLConv.h"

int main(int argc, char* argv[])
{
	if (argc != 3) {
		printf("invalidate params.");
		return 0;
	}

	char szECGFileName[1024] = {0};
	char szFDAXMLFileName[1024] = {0};
	memcpy(szECGFileName, argv[1], strlen(argv[1]));
	memcpy(szFDAXMLFileName, argv[2], strlen(argv[2]));

	printf("Begin\n");
	printf(szECGFileName);
	printf("\n");
	printf(szFDAXMLFileName);
	printf("\n");

	char szErrorMsg[1024] = {0};
	if(!ECGFDAXMLConvert(szECGFileName, szFDAXMLFileName, "CHN", szErrorMsg)){
		printf("Biocare ECG to FDAXML convert succeed.\n");
	}else{
		printf(szErrorMsg);
		printf("\n");
		printf("Biocare ECG to FDAXML convert failured.\n");
	}

	printf("end\n");
	return 0;
}

